import request from '@/utils/request'

export function getAllCoupon(data) {
  return request({
    url: '/shop/coupon/getAllCoupon',
    method: 'post',
    data
  })
}

export function updateOrSave(data) {
  return request({
    url: '/shop/coupon',
    method: 'put',
    data: {
      ...data
    }
  })
}

export function deleteObj(id) {
  return request({
    url: '/shop/coupon/' + id,
    method: 'delete'
  })
}
